package com.atguigu.gulimall.auth.feign;

import com.atguigu.common.utils.R;
import com.atguigu.common.vo.MemberOAuthVo;
import com.atguigu.gulimall.auth.vo.SocialUser;
import com.atguigu.gulimall.auth.vo.UserLoginVo;
import com.atguigu.gulimall.auth.vo.UserRegistVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@RequestMapping("/member/member")
@FeignClient("gulimall-member")
public interface MemberFeignService {

    @PostMapping("/regist")
    R regist(@RequestBody UserRegistVo vo);

    @PostMapping("/login")
    R<MemberOAuthVo> login(@RequestBody UserLoginVo userLoginVo);

    @PostMapping("/oauth2Login")
    R<MemberOAuthVo> oauth2Login(@RequestBody SocialUser socialUser);

}
